/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package introse;

/**
 *
 * @author Rommel
 */
public class WelcomeScreen extends javax.swing.JFrame {

    /**
     * Creates new form mainMenu
     */
    public WelcomeScreen() {
        initComponents();
        setLocationRelativeTo(null);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        sourceButton = new javax.swing.JButton();
        clientButton = new javax.swing.JButton();
        productButton = new javax.swing.JButton();
        transactionButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Welcome Screen");
        setName("mainMenu");

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse/images/Sashmir Gasul Marketing.png"))); // NOI18N

        sourceButton.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        sourceButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse/images/Inventory.png"))); // NOI18N
        sourceButton.setText("Source");
        sourceButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        sourceButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        sourceButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sourceButtonActionPerformed(evt);
            }
        });

        clientButton.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        clientButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse/images/Client.png"))); // NOI18N
        clientButton.setText("Client");
        clientButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        clientButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        clientButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clientButtonActionPerformed(evt);
            }
        });

        productButton.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        productButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse/images/Product.png"))); // NOI18N
        productButton.setText("Product");
        productButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        productButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        productButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                productButtonActionPerformed(evt);
            }
        });

        transactionButton.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        transactionButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/introse/images/Transaction.png"))); // NOI18N
        transactionButton.setText("Transaction");
        transactionButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        transactionButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        transactionButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                transactionButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(transactionButton, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(sourceButton, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(clientButton, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(productButton, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(productButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(clientButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(sourceButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(transactionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void clientButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clientButtonActionPerformed
        mainWindow mainWin = new mainWindow();
        mainWin.setVisible(true);
        mainWin.setIndex(2);
        this.dispose();
    }//GEN-LAST:event_clientButtonActionPerformed

    private void transactionButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_transactionButtonActionPerformed
        mainWindow mainWin = new mainWindow();
        mainWin.setVisible(true);
        mainWin.setIndex(0);
        this.dispose();
    }//GEN-LAST:event_transactionButtonActionPerformed

    private void sourceButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sourceButtonActionPerformed
        mainWindow mainWin = new mainWindow();
        mainWin.setVisible(true);
        mainWin.setIndex(1);
        this.dispose();
    }//GEN-LAST:event_sourceButtonActionPerformed

    private void productButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_productButtonActionPerformed
        mainWindow mainWin = new mainWindow();
        mainWin.setVisible(true);
        mainWin.setIndex(3);
        this.dispose();
    }//GEN-LAST:event_productButtonActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(WelcomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(WelcomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(WelcomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(WelcomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new WelcomeScreen().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton clientButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JButton productButton;
    private javax.swing.JButton sourceButton;
    private javax.swing.JButton transactionButton;
    // End of variables declaration//GEN-END:variables
}
